package com.crland.Config;

import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PropertiesLoaderUtils;

import java.io.IOException;
import java.util.Properties;

public class Config {
    public  String getDownloadPath() {
        Resource resource = null;
        Properties props = null;
        String downloadPath = "";
        try {
            resource = new ClassPathResource("/jdbc.properties");
            props = PropertiesLoaderUtils.loadProperties(resource);
            downloadPath= (String) props.get("download.path");
        } catch (IOException e) {
            e.printStackTrace();
        }
        return downloadPath;

    }
}
